import BasicConfig from "../utils/config";
/**
 * 优惠券类型
 * 1代金券(满减)
 * 2折扣券
 */
export const couponType = {
  money: 1,
  discount: 2,
};
export const couponTypeConfig = {
  [couponType.money]: {
    value: couponType.money,
    typeName: "满减",
  },
  [couponType.discount]: {
    value: couponType.discount,
    typeName: "折扣",
  },
};
/**
 * 优惠券领取状态
 * 0.未领取
 * 1.已领取
 */
export const takeCoupnStatus = {
  untake: 0,
  take: 1,
};
/**
 * 优惠券领取状态配置
 */
export const takeCoupnStatusConfig = {
  [takeCoupnStatus.untake]: {
    value: takeCoupnStatus.untake,
    typeName: "未领取",
    btnName: "立即领取",
    btnStyle: {
      color: "#ffffff",
      background: BasicConfig.MainColor,
    },
  },
  [takeCoupnStatus.take]: {
    value: takeCoupnStatus.take,
    typeName: "已领取",
    btnName: "已领取",
    btnStyle: {
      color: "#ffffff",
      background: "#bbbbbb",
    },
  },
};

/**
 * 我的优惠券状态
 * 0.未使用
 * 1.已使用
 * 2.已过期
 */
export const myCouponStatus = {
  unuse: 0,
  use: 1,
  timeout: 2,
};

/**
 * 优惠券限用时效
 * 0.不限
 * 1.周末
 * 2.工作日
 */
export const couponUseType = {
  nolimit: 0,
  weekend: 1,
  weekday: 2,
};
export const couponUseTypeConfig = {
  [couponUseType.nolimit]: {
    value: couponUseType.nolimit,
    desc: "不限",
  },
  [couponUseType.weekend]: {
    value: couponUseType.weekend,
    desc: "周末",
  },
  [couponUseType.weekday]: {
    value: couponUseType.weekday,
    desc: "周一、周二、周三、周四、周五",
  },
};

/**
 * 优惠券有效期类型
 * 1.领取之日起
 * 2.活动周期
 */
export const couponWellType = {
  today: 1,
  date: 2,
};
